#pragma once
#include "def.h"
#include "context.h"
#include "ActionApiBase.h"
#include "agencyevent.h"
#include "9200_agency_event_api.pb.h"
#include "accountmgr.h"
#include "json.h"

class ActionNotify : public ActionApiBase
{
public:
    static bool Init();
    static void Handle(MsgData&& msg_data);
    static void OnAgencyEventGetInc(std::uint32_t agencyid, std::uint16_t svtype, std::uint32_t svid, std::uint32_t uuid,  const std::string& notify_string);
    static void OnAgencyEventGet(std::int32_t err_code, stAgencyEvent* agencyevent, std::string&& trans);
    static void OnAccountGet(std::int32_t err_code, Account* pAccount, std::string&& trans);
    static int CheckData(const int type, Json::Value& data);
protected:
    static void Request(const stAgencyEvent& agencyevent, std::uint16_t svtype, std::uint32_t svid, std::uint32_t uuid, const std::string& notify_string);
};